package com.inspiration.entity;

import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.List;

/**
 * @Description
 * @Author Vincent.jiao
 * @Date 2023/10/26 15:28
 */
@Data
public class Page {
    private Integer page;   //页数
    private Integer pageSize;   //每页大小
    private List rows;
    private long total;  //总个数
    private long totalPage;      //全部页数

    public  Page(PageInfo pageInfo) {
        this.pageSize = pageInfo.getPageSize();
        this.rows = pageInfo.getList();
        this.page = pageInfo.getPageNum();
        this.totalPage = pageInfo.getPages();
        this.total = pageInfo.getTotal();
    }
}
